#!/usr/bin/env python
import sys
import gtk

class CellRendererCustom( gtk.CellRendererText ):

	#father = ICustomCellTreeView
	def __init__( self, father ):
		gtk.CellRendererText.__init__( self )
		self.Father = father
		self.set_property( "mode", gtk.CELL_RENDERER_MODE_EDITABLE )
	
	def GetSize ( self, widget, cell_area, x_offset, y_offset, width, height):
		result  = gtk.gdk.Rectangle( 0, 0, 0, 0 )
		self.Father.OnMeasureItem( ItemIndex, Iter, widget, cell_area, result )
		x_offset = result.X
		y_offset = result.Y
		width    = result.Width
		height   = result.Height
		
	def Render ( self, window, widget, background_area, cell_area, expose_area, flags):
		self.Father.OnDrawItem(ItemIndex, Iter, window, widget, background_area, cell_area, expose_area, flags )
		
